#pragma once
#include <iostream>
#include "network.h"

namespace krryn{
namespace core{
namespace io{
	template<typename E, typename T = std::char_traits<E> >
	class basic_onstream : public std::basic_ostream<E, T>{
	public:
		basic_onstream(const std::string &a_Ip = "127.0.0.1", unsigned short a_Port = 27912)
			: std::basic_ostream<E, T>(krryn::system::output_buffer<E, T>(a_Ip, a_Port)) {}
		~basic_onstream() { delete this->rdbuf(); }
	};

	typedef basic_onstream<char> onstream;
	typedef basic_onstream<wchar_t> wonstream;
}
}
}
